package com.sun.filesigndemo.bussiness.mapper;

import com.sun.filesigndemo.baseMapper.MyMapper;
import com.sun.filesigndemo.common.entity.File;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface FileMapper extends MyMapper<File> {

    File selectByFileName(@Param("fileName") String name);

    List selectAllFileNameAndId();

    int changeBelongByFileIdAndName(@Param("id") int id, @Param("fileName") Object fileName, @Param("belong") String user);

    Map selectLastRowStatusByFilePath(@Param("path") String path);

    List selectByUserName(@Param("username") String username);

    int updateStatusAndLastRowByPath(@Param("path") String txtPath, @Param("rowNum") int rowNum);

    int updateLastRowByPath(@Param("path") String txtPath, @Param("rowNum") int rowNum);
}
